import { DtoValidation } from '@/modules/core/decorators/dto-validation.decorator';
import { Injectable } from '@nestjs/common';
import { IsNotEmpty, IsString } from 'class-validator';

@Injectable()
@DtoValidation({ type: 'body' })
export class CreateBannerDto {
  @IsString()
  @IsNotEmpty({ message: '标题不能为空' })
  title: string;

  @IsString()
  @IsNotEmpty({ message: '描述不能为空' })
  desc: string;

  @IsString()
  @IsNotEmpty({ message: '图片不能为空' })
  media: string;
}
